html {
    font-family:'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body{
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background-color: rgb(39, 38, 38);
    
    margin: 0;
    
    flex-direction: column;

}




h1{
    color: white;
    position: relative;
    width: max-content;
    font-size: 40px;

}


h1::after 
{
        content: '';
        background: linear-gradient(to right, red, yellow,white, blue,white,yellow,orange);
        border-radius: 100px;
        height: 1px;
        width: 100%;
        position: absolute;
        bottom: 0px;
        left: 0px;
        transition: 10ms;

}
h1:hover::after
{
        width: 0;
}


.container{
    position:relative;
    text-align: center;
    width: 50px;
    height: 50px;
    margin-top: 20px;
    margin-bottom: 20px;
    overflow: hidden;
    z-index: 100;

}

body::before{

     content: "";
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background-image: url('http://mnsedu.co.in/imgs land py/background/1bk.png'); /* Replace with your image URL */
      background-size: cover;
      background-position: center;
      background-repeat: no-repeat;
      opacity: 0.05;             /* Set background opacity */
      z-index: 0;
}

.square{
    position: absolute;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background-color: aqua;
    z-index: 100;

}
.square:nth-child(1){
    top: 0;
    left: 0;
   z-index: 100;
}

.square:nth-child(2){
    top: 0;
    right: 0;
   z-index: 100;
}

.square:nth-child(3){
    bottom: 0;
    left: 0;
   z-index: 100;
}

.square:nth-child(4){
    bottom: 0;
    right: 0;
   z-index: 100;
}

#secondsdisplay{

    background-color: red;
    width: 38%;
    min-height: 35px;
    text-align: center;
    line-height: 35px;
    margin-top: 30px;
    color: white;
    border-radius: 5px;
    font-family:Verdana, Geneva, Tahoma, sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
    
}

#secondsdisplay:hover{
box-shadow: 2px 2px 10px white;
}


@keyframes rotate {
    0%{
        transform: rotate(0deg);
    }

    100%{
        transform: rotate(360deg);
    }
    
}

.container{
    animation: rotate 4s infinite linear;
}

.square{
    animation: color-change 4s infinite alternate;
}

@keyframes color-change {
    0%{
        background-color: aqua;
    }

    20%{
        background-color: green;
    }

    40%{
        background-color: red;
    }

    60%{
        background-color: yellow;
    }

   80%{
        background-color: aqua;
    }

    100%{
        background-color: blueviolet;
    }
    
}


@media (max-width: 768px) {
    h1 {
        font-size: 25px;  /* Adjust font size for smaller screens */
      /* Ensure it fits within the mobile screen */
        white-space: normal; /* Ensure wrapping */
        text-align: center;

    }

    h1::after {

        content: '';
        min-width:min-content;
        align-items: center;
    }
    #secondsdisplay{
        line-height: 35px;
        width: 80%;
         
    }

    .container{
        width: 40px;
        height: 40px;
    }
    .square{
    width: 12px;
    height: 12px;
    }
}